#!/bin/sh
# - test

. $LKP_SRC/lib/debug.sh
. $LKP_SRC/lib/reproduce-log.sh

if [ "$test" = "jit" ]; then
	log_cmd sysctl net.core.bpf_jit_enable=1 || die "setup bpf_jit failed"

	log_cmd modprobe test_bpf
elif [ "$test" = "non-jit" ]; then
	log_cmd modprobe test_bpf
else
	die "Parameter \"test\" is wrong"
fi

# there are mainly two reasons for "sleep 5" is here:
# - extent runtime
# - give a buffer time so that relevant info be fully written to dmesg
log_cmd sleep 10

log_cmd dmesg | log_cmd tail -1000
